package com.followmeandroid.util;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;

/**
 * Created by Adam on 11/23/2014.
 */

//not used, but left in b/c it may come in handy.
public class EditTextSingleLine extends EditText {

    public EditTextSingleLine(Context context, AttributeSet attrs) {
        super(context, attrs);

    }

    public EditTextSingleLine(Context context) {
        super(context);

    }

    public EditTextSingleLine(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        switch (keyCode) {
            case (KeyEvent.KEYCODE_ENTER):
                return true;
            default:
                return super.onKeyDown(keyCode, event);
        }
    }
}
